package com.cherrish.demo;

import java.util.Map;

/**
 * @author cherrish
 * @time 2019-02-20 10:41
 * @name TestFileSystem
 * @desc:
 */
public class TestFileSystem {
    public static void main(String[] args) {
        Map<String, String> map = SystemInfoUtil.getSystemDir();
        for(Map.Entry<String, String> entry : map.entrySet()){
            System.out.print(entry.getKey());
            System.out.print(" : ");
            String[] vals = entry.getValue().split(",");
            System.out.print("totalSize = " + SystemInfoUtil.formetFileSize(Long.parseLong(vals[0])));
            System.out.print(", ");
            System.out.println("freeSize = " + SystemInfoUtil.formetFileSize(Long.parseLong(vals[1])));
        }

        SystemInfoUtil.getMemery();
    }


}
